<script type="text/javascript">

    
</script>
<head>
    <script src="js/clientes.js" type="text/javascript"></script>
</head>
<body onload="getClientes('IdCliente')">
    <div style="height: 35px;"></div>
    <table id="clientes" border="0" style="width: 100%;">
        <tbody>
            <tr><td colspan="8"><h1>Administración > Clientes</h1></td></tr>
            <tr>
                <td>Nombre</td>
                <td><input type="text" id="txtNombre" name="txtNombre" value=""  onkeyup="getClientes('Apellido');" class="generalInput search"/></td>
                <td>Apellido</td>
                <td><input type="text" id="txtApellido" name="txtApellido" value=""  onkeyup="getClientes('Apellido');" class="generalInput search"/></td>
                <td>Mail</td>
                <td><input type="text" id="txtMail" name="txtMail" value="" onkeyup="getClientes('Apellido');" class="generalInput search"/></td>
                <td>Nacionalidad</td>
                <td>
                    <SELECT name="cboNacionalidad" id="cboNacionalidad" class="generalInput">
                        <?php
                        require_once 'MyDB.php';
                        $con = new MyDB();
                        $query = $con->selectFrom("countries", $columns = null, $where = null, $like = false, $orderby = "country_name", $direction = "ASC", $limit = null, $offset = null);
                        $result = $query["result"];
                        foreach ($result as $row) {
                            echo "<option value=" . $row["id"] . ">" . $row["country_name"] . "</OPTION>";
                        }
                        ?>
                    </SELECT>
                </td>
            </tr>
            <tr>
                <td>Comentarios</td>
                <td><input type="text" id="txtComentarios" name="txtComentarios" value="" class="generalInput"/></td>
                <td>Tipo Doc.</td>
                <td>
                    <SELECT name="cboTipoDoc" id="cboTipoDoc" class="generalInput">
                        <option value=0>DNI</OPTION>";
                        <option value=1>Passaporte</OPTION>";
                        <option value=2>Cédula</OPTION>";
                        <option value=3>Libreta</OPTION>";
                        <option value=4>Otro</OPTION>";

                    </SELECT>
                </td>

                <td>Nro. Doc.</td>
                <td><input type="text" id="txtNroDoc" name="txtNroDoc" value="" onkeyup="getClientes('Apellido');" class="generalInput search"/></td>
                <td>Marcado</td>
                <td><input type="checkbox" id="chkMarcado" name="chkMarcado" class="generalInput"/></td>
                <td colspan="1"></td><td><input type="button" value="Guardar" name="save" onclick="saveCliente()" class="btnSave"/></td>
            </tr>
            <tr>
                <td colspan="12">
                    <table id="results" class="resultsHeader" style="width: 100%;" cellspacing="0" cellpadding="0" border="0">
                        <thead >
                            <tr >
                                <th style="width: 10px;" onclick="getClientes('IdCliente')" >Id</th>
                                <th onclick="getGastos('Fecha')" >Nombre</th>
                                <th>Apellido</th>
                                <th>Mail</th>
                                <th>Nacionalidad</th>
                                <th>Comentarios</th>
                                <th>Tipo Doc.</th>
                                <th>Nro. Doc.</th>
                                <th>Marcado</th>
                                <th colspan="2">Acciones</th>

                            </tr>
                        </thead>
                        <tbody id="listado">

                        </tbody>    
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
    <input type="hidden" id="hRol" value="<?php echo $_SESSION['remises_rol'] ?>"/>
    <div id="resultadosServer" class="resultadosServer" ></div>
</body>